from django import forms
from django.core.urlresolvers import reverse
from chicago.models import *

class LookupForm(forms.Form):
    location = forms.CharField(
                label='Where do you live in Chicago?', 
                max_length=100,
                widget=forms.TextInput(attrs={'size':'35'}),
                help_text='<span>For example: <a href="/?location=435 N Michigan Ave">435 N Michigan Ave</a> or <a href="/?location=old town">Old Town</a></span>' 
               )

class SubForm(forms.ModelForm):

    def __init__(self, *args, **kwargs): 
        # Just want to set some hidden fields
        super(SubForm, self).__init__(*args, **kwargs) 
        self.fields['feed'].widget = forms.widgets.HiddenInput()

    #email = forms.EmailField(   
    #            label="What is your email address?",
    #            max_length = 50,)

    class Meta:
        model = Subscription
        exclude = ('reps','ward','senate','house','congress','place',
                   'point','remove', 'created', 'confirmed','confirm_key')
